package binarycrew.livewallpapers.wallpapers;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.Log;

/**
 * User: Richard MihaloviÄ�
 */
public class LiveWallpaper_1 extends ALiveWallpaper {

    public LiveWallpaper_1(){
        this.code = "wallpaper_1";
    }

    @Override
    public String getName() {
        return "Sample wallpaper #1";
    }

    @Override
    public String getDescription() {
        return "Example wallpaper #1";
    }

    @Override
    public Double getFPS() {
        return (double) 25;
    }

    @Override
    public void create() {
    }

    @Override
    public void destroy() {
    }

    @Override
    public void drawCanvas(Canvas canvas) {
        if(!isInitialised) return;

        // clear background
        canvas.drawColor(Color.BLACK);

        Paint paintS = new Paint(Paint.ANTI_ALIAS_FLAG);
        paintS.setStyle(Paint.Style.STROKE);
        paintS.setColor(Color.WHITE);
        paintS.setTextSize(10);
        paintS.setTextAlign(Paint.Align.CENTER);

        Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
        paint.setStyle(Paint.Style.STROKE);
        paint.setColor(Color.WHITE);
        paint.setStrokeWidth(3);
        paint.setTextSize(30);
        paint.setTextAlign(Paint.Align.CENTER);

        int centerX = getWidth() / 2;
        int centerY = getHeight() / 2;

        canvas.drawText(
            Long.toString(System.currentTimeMillis()),
            centerX,
            50,
            paintS
        );

        canvas.drawText(
            getName(),
            centerX,
            centerY,
            paint
        );
    }
}
